package rs.etf.kdp.server;

public class SendPermission {
	private boolean okToSend = true;
	public synchronized void requireSend()
	{
		while(!okToSend)
			try {
				wait();
			} catch (InterruptedException e) {
				System.out.println("\nError with wait");
			}
	}
	
	public synchronized void releaseSent()
	{
		okToSend = true;
		notifyAll();
	}
}
